Skip to content

feat(contract): let an extension ask FormCite for sources through the host (0.12.1) - #16

Merged
nodemode-ai merged 18 commits into
mainfrom
feat/fcite-call-0.12.0
Nov 29, 2026
Merged

nodemode-ai merged 18 commits into
mainfrom
feat/fcite-call-0.12.0

Conversation

@nodemode-ai

Copy link
Copy Markdown
Contributor

feat(contract): fcite.call, so an extension can ask FormCite for sources (0.12.0)

Summary

  • A new optional contract method, fcite.call { service, method, params? }, under a new permission, fcite.addon, granted per service with its own consent line.
  • A package names the services it wants in a new services field. The catalog has one, formcite, with search, get, cite, bibliography, add and import.
  • The host app makes the request, never the extension's frame. The host may reach 127.0.0.1 for a cataloged service only; net.fetch stays https only.
  • The schema, host bridge, SDK, Python host and package checker all carry the change, and product ids formtxt, formcel and formcite are accepted.
  • Preview has a simulated FormCite, and the hello example searches it.

Commits

12 commits, no merges: 5 feat(contract), and one each of feat(sdk), feat(sim), feat(preview), docs(contract), docs(manual), docs(frontend), chore(release).

Version

0.11.0 to 0.12.0, a minor bump for an optional contract addition. Every version site moves in the last commit, except the family spec file, which the release automation writes.

Checks

  • The 265 interface unit cases passed in a private copy, before the release commit.
  • The contract's Python files compile and its JSON parses at each of the 12 commits. The package checker accepts the hello example on the head.
  • By the build agent, not repeated by the orchestrator: hello in a built copy showed one found title when allowed, -32001 with the permission off, and -32601 as an older host.

Not run: the engine test layer, so it is not known whether an existing case needs the new schema values; a real, approved FormCite search (pairing needs a person in FormCite); the browser demo rebuild; the desktop shell.

Merging

Merge with a merge commit so each commit and its signature stays. Do not squash.

…rmission

The contract gains family services through the host, with loopback only for cataloged services, and three product ids.
…t ids

The package schema lists formtxt, formcel and formcite and the services field.
The bridge knows the family service catalog, checks the fcite.addon permission and the services a package named, and answers -32601 when the host has no service handler.
Extensions call formext.fcite.call with typed params and results for each FormCite method.
…pback

The resolver accepts fcite.addon with cataloged services, and FamilyService pairs and calls a sibling app on 127.0.0.1 while holding the token itself.
The checker accepts a package naming cataloged services with fcite.addon and refuses an unknown service id.
Preview answers fcite.call from a canned FormCite library, and answers -32601 when the older-host switch is set.
The hello panel calls fcite.call search and shows the titles, or the error code when it is refused.
The simulated host lists each named service with its own consent sentence and names fcite.call for the permission.
The manual says how Preview answers family service calls, the denied path and the older host.
The frontend log records the simulated service, the older host switch and the denied path.
Moves every version site to 0.12.0 and adds the changelog section for the fcite.call contract addition.
@nodemode-ai
nodemode-ai requested a review from gbarnai as a code owner November 27, 2026 23:15
FamilyService now reads engine.json from the service's data folder when no port is given, and falls back to the catalog port when the file is missing or unreadable.
An older host's package check refuses a package that asks for fcite.addon before its bridge can answer -32601, and API 1 has no optional permission, so the contract now says to ship two builds to load on both.
The contract now names engine.json, its data folder and the order explicit port, port file, catalog default, matching FamilyService.
The manual now says Preview answers from a simulated library, what a real older host does with fcite.addon, and how a host pairs with a real FormCite through FamilyService.
Records why FamilyService reads engine.json and why a package asking for fcite.addon needs a second build for 0.11.0 hosts, with what was run.
Every version site moves to 0.12.1 and the changelog gets its section.
@nodemode-ai nodemode-ai changed the title feat(contract): fcite.call, so an extension can ask FormCite for sources (0.12.0) feat(contract): let an extension ask FormCite for sources through the host (0.12.1) Nov 28, 2026
@nodemode-ai

Copy link
Copy Markdown
Contributor Author

feat(contract): let an extension ask FormCite for sources through the host (0.12.1)

Summary

  • The first twelve commits are the 0.12.0 work already on this branch: the optional call fcite.call, the permission fcite.addon, the manifest field services, and Preview's simulated FormCite.
  • New in 0.12.1: the Python host finds a running FormCite by itself. Cause of the fault: FamilyService only tried port 8330, and FormCite's desktop app takes a new port each launch and writes it to engine.json. The order is now the port given, the port in that file (FORMCITE_DATA_DIR, else ~/FormCite), then 8330.
  • The contract says what an older host does: a 0.11.0 host refuses a package that asks for fcite.addon, so that package never sees -32601; an author who needs both hosts ships two builds.
  • The manual says Preview answers from a simulated library and how a real host reaches a real FormCite.

Commits

6 new commits on top of the 12 already pushed, oldest first, release commit last:

  • 1 fix (port file read before the default port)
  • 4 docs (contract twice, manual, log)
  • 1 chore (release 0.12.1)

Version

v0.12.1 (release commit is last). Bumped: README badge, frontend/package.json, two fields in frontend/package-lock.json, frontend/src/shell/version.ts, backend/app/__init__.py, src-tauri/Cargo.toml, the formext entry in src-tauri/Cargo.lock, src-tauri/tauri.conf.json, frontend/src/demo/engine/router.ts, and a new CHANGELOG.md section.

Checks

  • python3 -m py_compile contract/host/python/formext_host.py passed at each new commit.
  • Against a real FormCite 0.13.9 engine on port 8963: FamilyService with no port given found it from engine.json through FORMCITE_DATA_DIR and through ~/FormCite, and pair() answered pending; a missing folder, broken JSON and a port given as text each fell back to 8330; an explicit port won.
  • The 0.11.0 check refused hello with fcite.addon and accepted it without; the 0.12.0 check accepted both.
  • Earlier the same night, at commit affacd2: the hello example, through this repo's host bridge and FamilyService, showed one found title from a real FormCite after the host's consent and the approval in FormCite; -32001 with the permission off; -32601 from the 0.11.0 bridge; -32004 after access was removed and -32003 after a pairing was denied.

Not run: ./formext test; npm run check (no installed frontend here); form.ext's own window; anything on macOS or Windows.

Merging

Merge with a merge commit so each commit and its signature stays. Do not squash.

@nodemode-ai
nodemode-ai merged commit 6c2708c into main Nov 29, 2026
4 of 6 checks passed
@nodemode-ai
nodemode-ai deleted the feat/fcite-call-0.12.0 branch November 29, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant